package com.lotter.common.enumobject;


/**
 * @ClassName: UserAccountStatusEunm 
 * @Description: 前端用户级别
 * @author zhangzechi
 * @date 2016年7月27日 下午3:27:33  
 * @version V1.0
 */
public enum UserAccountLevelEunm {

	ORDINARY(1, "普通玩家",0.02), KILLER(2, "房主",0.03),OKAMI(3,"大神",0.04);

	private int code;
	private String desc;
	private Double num ;

	private UserAccountLevelEunm(int code, String desc,Double num) {
		this.code = code;
		this.desc = desc;
		this.num = num ;
	}

	public int getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}
	
	
	
	public Double getNum() {
		return num;
	}



	public static UserAccountLevelEunm getBorrowType (int code) {
		for(UserAccountLevelEunm type : UserAccountLevelEunm.values()){
			if(type.getCode() == code){
				return type;
			}
		}
		return null;
	}

	public static String getName(int i){
		for (UserAccountLevelEunm eunms : values()) {
			if(eunms.getCode()==i){
				return eunms.getDesc();
			}
		}
		return null;
	}
	
	public static Double getNum(int i){
		for (UserAccountLevelEunm eunms : values()) {
			if(eunms.getCode()==i){
				return eunms.getNum();
			}
		}
		return null;
	}
}
